<template>
  <div id="app" :style="'height:'+ fullHeight + 'px;'">
    <router-view/>
  </div>
</template>
<script>
  import {mapActions} from 'vuex'
  export default {
    name:'App',
    data(){
      return{
        fullHeight:document.documentElement.clientHeight,
        fullWidth:document.documentElement.clientWidth,
      }
    },
    computed:{

    },
    created(){
      // const that = this
      // window.onresize = ()=>{
      //   return (()=>{
      //     window.fullHeight = document.documentElement.clientHeight
      //     window.fullWidth = document.documentElement.clientWidth
      //     that.fullHeight = window.fullHeight
      //     that.fullWidth = window.fullWidth
      //   })()
      // }
      this.currentTime();
      this.$store.state.beishu = this.fullWidth/1366
      console.log(this.$store.state.beishu)
    },
    methods:{
      ...mapActions(['widthAndHeightFun','getTime']),
      currentTime(){
        setInterval(this.getTime,500)//自动更新时间
      },
    }
  }
</script>
<style lang="less">
  body{
    margin: 0;
    padding: 0;
  }
</style>
